package com.example.工厂模式.抽象工厂;

/**
 * 测试类
 */
public class Main {

    public static void main(String[] args) {
        Factory hangZhouFactory = new HangZhouFactory();
        Cheese hangZhouCheese = hangZhouFactory.makeCheese();
        Milk hangZhouMilk = hangZhouFactory.makeMilk();
        hangZhouCheese.print();
        hangZhouMilk.print();

        Factory nanJingFactory = new NanJingFactory();
        Cheese nanJingCheese = nanJingFactory.makeCheese();
        Milk nanJingMilk = nanJingFactory.makeMilk();
        nanJingCheese.print();
        nanJingMilk.print();
    }
}
